package com.star.test.base;

public abstract class Base {

    private int x;
    private int y;

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public final int sum() {
        return getX() + getY();
    }

    /*public int calculate() {
        if (avg() == 0) {
            return 0;
        } else {
            return sum() / avg();
        }
    }*/

    /**
     * 返回x和y的和
     */
    //public abstract int sum();

    /**
     * 返回x和y的平均值
     */
    //public abstract int avg();

}